backupIncludePath = get_include_path(); vfsStream::setup(); mkdir('vfs://root/a/path', 0777, true); set_include_path('vfs://root/a' . PATH_SEPARATOR . $this->backupIncludePath); } /** * clean up test environment */ public function tearDown(): void { set_include_path($this->backupIncludePath); } /** * @test */ public function knownFileCanBeResolved() { file_put_contents('vfs://root/a/path/knownFile.php', ''); $this->assertEquals('vfs://root/a/path/knownFile.php', stream_resolve_include_path('path/knownFile.php')); } /** * @test */ public function unknownFileCanNotBeResolvedYieldsFalse() { $this->assertFalse(@stream_resolve_include_path('path/unknownFile.php')); } }